import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增矛盾题
export function addMd(data) {
  return request({
    url: '/businessCore/faContradictionQuestions',
    method: 'post',
    data
  })
}

// 修改矛盾题
export function updateMd(data) {
  return request({
    url: '/businessCore/faContradictionQuestions',
    method: 'put',
    data
  })
}

// 删除矛盾题
export function delMd(id) {
  return request({
    url: '/businessCore/faContradictionQuestions/' + id,
    method: 'delete'
  })
}

// 获取矛盾题
export function getMd(id) {
  return request({
    url: '/businessCore/faContradictionQuestions/' + id,
    method: 'get'
  })
}

// 导出矛盾题
export function exportMd(params, fileName) {
  const url = '/businessCore/faContradictionQuestions/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}